<?php

class Pages_IndexController extends Cms_CustomControllerAction
{
public $db;

    public function init()
    {
        /* Initialize action controller here */
         $this->db = Zend_Registry::get('db');
    }

    public function indexAction()
    {
        
        $pages = Model_Pages::GetPages($this->db);
       // echo'<pre>';print_r($news->fetchAll());echo'</pre>';
       $this->view->pages = $pages;
    }
    
    public function viewAction()
    {
     
        $id = $this->_getParam('pagesAlias');
        $pages = new Model_Pages($this->db);
        $pages->load($id, 'alias');
        $this->view->pages = $pages;
          // echo'<pre>';print_r( $news);echo'</pre>';
        //$this->view->news =  $news->getNewsAlias($id);
        
    }
    
}
